package cn.edu.sgu.www.mhxysy.dto.fabao;

import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import cn.edu.sgu.www.mhxysy.consts.RegExps;
import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Positive;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class FabaoLiangyiAttributeDTO implements DataTransferObject {

    @ApiModelProperty(value = "ID")
    private String id;

    /**
     * 进阶次数
     * 取值范围：[0, 3]
     */
    @Range(min = 0, max = 3, message = "进阶次数" + CustomMessages.ILLEGAL)
    @NotNull(message = "进阶次数" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "进阶次数", required = true)
    private Integer step;

    /**
     * 法宝ID
     */
    @Pattern(regexp = RegExps.FABAO_ID, message = "法宝ID" + CustomMessages.ILLEGAL)
    @NotBlank(message = "法宝" + CustomMessages.ID_NOT_NULL)
    @ApiModelProperty(value = "法宝ID", required = true)
    private String fabaoId;

    /**
     * 法宝属性数值ID
     */
    @Positive(message = "法宝属性数值ID" + CustomMessages.ILLEGAL)
    @NotNull(message = "法宝属性数值" + CustomMessages.ID_NOT_NULL)
    @ApiModelProperty(value = "法宝属性数值ID")
    private Integer valueId;

    /**
     * 两仪属性类型ID
     */
    @Positive(message = "两仪属性类型ID" + CustomMessages.ILLEGAL)
    @NotNull(message = "两仪属性类型" + CustomMessages.ID_NOT_NULL)
    @ApiModelProperty(value = "两仪属性类型ID", required = true)
    private Integer liangyiId;
}